const express = require('express');
const router = express.Router();
const multer = require('multer');
const AttachmentController = require('../controller/AttachmentController');

// 定义上传的目录
let upload = multer({ dest: 'uploads/' });

router.post(
  '/uploadPicture',
  upload.single('picture'),
  AttachmentController.uploadPicture
);
router.get('/getAllPicture', AttachmentController.getAllPicture);

router.delete('/delPicture', AttachmentController.delPicture);

module.exports = router;
